:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --font-size-base: 0.875rem;
    --font-size-sm: 0.75rem;
    --font-size-xs: 0.6875rem;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background-color: #fff;
    color: #333;
    border-left: 5px solid #0d6efd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    z-index: 1000;
    display: none;
    font-size: var(--font-size-base);
    max-width: 400px;
    word-wrap: break-word;
    animation: fadeIn 0.3s, fadeOut 0.3s 1.2s;
}

@keyframes fadeIn {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}

@keyframes fadeOut {
    from {opacity: 1; transform: translateY(0);}
    to {opacity: 0; transform: translateY(-20px);}
}

body.dark-theme .notification {
    background-color: #1e1e1e;
    color: #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: #4d9eff;
}

/* 基础卡片样式 */
.card {
    margin-bottom: 0.5rem !important;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 10px;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-header {
    padding: 8px 12px;
    font-size: var(--font-size-base);
}

.card-header h5 {
    font-size: var(--font-size-base);
}

.card-body {
    padding: 0.5rem;
}

/* 表格样式 */
.table th, .table td {
    padding: 0.25rem 0.5rem;
    font-size: var(--font-size-sm);
}

.table th {
    font-weight: 600;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.table-container {
    height: calc(100vh - 200px);
    overflow-y: auto;
}

.table-container thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: #2d2d2d;
}

/* 深色主题样式 */
body.dark-theme {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-theme .card {
    background-color: #1e1e1e;
    color: #e0e0e0;
    border-color: #444;
}

body.dark-theme .table {
    color: #e0e0e0;
}

body.dark-theme .table-striped>tbody>tr:nth-of-type(odd)>* {
    color: #e0e0e0;
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-theme .table-striped>tbody>tr:nth-of-type(even)>* {
    color: #e0e0e0;
    background-color: transparent;
}

body.dark-theme .table-hover>tbody>tr:hover>* {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.075);
}

body.dark-theme .table-dark {
    --bs-table-bg: #2d2d2d;
    --bs-table-striped-bg: #343434;
    --bs-table-striped-color: #fff;
    --bs-table-active-bg: #373b3e;
    --bs-table-active-color: #fff;
    --bs-table-hover-bg: #323539;
    --bs-table-hover-color: #fff;
    color: #fff;
    border-color: #373b3e;
}

body.dark-theme .table-container thead th {
    background-color: #2d2d2d;
}

/* 文本颜色样式 */
.text-success {
    color: var(--success-color) !important;
    font-weight: 500;
}

.text-danger {
    color: var(--danger-color) !important;
    font-weight: 500;
}

/* 进度条样式 */
.progress {
    height: 6px;
    margin-top: 3px;
}

.progress-bar {
    transition: width 0.5s ease;
}

/* 状态标记样式 */
.status-badge {
    padding: 3px 8px;
    border-radius: 20px;
    font-size: var(--font-size-xs);
    font-weight: 500;
}

.bg-success-light {
    background-color: rgba(25, 135, 84, 0.1);
}

.bg-danger-light {
    background-color: rgba(220, 53, 69, 0.1);
}

/* 状态标签样式 */
#statusLabel {
    font-size: var(--font-size-sm);
    padding: 4px 10px;
}

/* 复选框样式 */
.row-checkbox {
    transform: scale(1.0);
    margin: 0;
}

#selectAll {
    transform: scale(1.0);
}

/* 模态框样式 */
.modal-content {
    border: none;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.modal-content .modal-header,
.modal-content .modal-body,
.modal-content .modal-footer {
    padding: 0.75rem;
}

/* 主题切换器样式 */
.theme-switcher .btn {
    padding: 3px 8px;
    font-size: var(--font-size-sm);
}

/* 表单样式 */
.form-label {
    font-size: var(--font-size-sm);
    margin-bottom: 0.25rem;
}

.form-control {
    font-size: var(--font-size-base);
    padding: 0.25rem 0.5rem;
    height: calc(1.5em + 0.5rem + 2px);
}

/* 按钮样式 */
.btn {
    padding: 0.25rem 0.5rem;
    font-size: var(--font-size-sm);
    line-height: 1.5;
}

.btn i {
    font-size: var(--font-size-sm);
}

/* 间距样式 */
.gap-2 {
    gap: 0.25rem;
}

.gap-3 {
    gap: 0.5rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }
    
    .card-body {
        padding: 0.5rem;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
    
    .btn {
        padding: 0.25rem 0.5rem;
        font-size: var(--font-size-sm);
    }
    
    .form-label {
        font-size: var(--font-size-sm);
    }
    
    .form-control {
        font-size: var(--font-size-sm);
        padding: 0.25rem 0.5rem;
    }
    
    .card-header {
        padding: 6px 10px;
    }
}